<?php

namespace Base\Controllers;


use Laravel\Lumen\Routing\Controller as BaseController;

class Controller extends BaseController
{
    /**
     * 输出json function
     *
     * @param integer $status 状体码
     * @param string $message 信息
     * @param array $data 数据
     * @param array $header 
     * @return void
     */
    public function response(array $data,$status=200,string $message='',array $header=[]){
        return response()->json(['status' => $status, 'message' => $message, 'timemap'=>time() ,'data'=>$data],$status,$header);
    }
}
